package com.example.a2207_zh.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.a2207_zh.R
import com.example.a2207_zh.entity.GiftEntity

class GiftAdapter(list: MutableList<GiftEntity>):BaseQuickAdapter<GiftEntity,BaseViewHolder>(R.layout.item_gift,list) {
    override fun convert(holder: BaseViewHolder, item: GiftEntity) {
        holder.setText(R.id.gift_price,"${item.price}元")
        Glide.with(context).load(item.giftpath).into(holder.getView(R.id.gift_iv))
    }
}